Optimal. Leaf size=204 \[ -\frac {9 i \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{32 \sqrt {2} a^{5/2} d}+\frac {9 i a}{28 d (a+i a \tan (c+d x))^{7/2}}-\frac {i a^2}{2 d (a-i a \tan (c+d x)) (a+i a \tan (c+d x))^{7/2}}+\frac {9 i}{40 d (a+i a \tan (c+d x))^{5/2}}+\frac {3 i}{16 a d (a+i a \tan (c+d x))^{3/2}}+\frac {9 i}{32 a^2 d \sqrt {a+i a \tan (c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.10, antiderivative size = 204, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 5, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.192, Rules used = {3568, 44, 53,
65, 212} \begin {gather*} -\frac {9 i \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{32 \sqrt {2} a^{5/2} d}-\frac {i a^2}{2 d (a-i a \tan (c+d x)) (a+i a \tan (c+d x))^{7/2}}+\frac {9 i}{32 a^2 d \sqrt {a+i a \tan (c+d x)}}+\frac {9 i a}{28 d (a+i a \tan (c+d x))^{7/2}}+\frac {9 i}{40 d (a+i a \tan (c+d x))^{5/2}}+\frac {3 i}{16 a d (a+i a \tan (c+d x))^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 44
Rule 53
Rule 65
Rule 212
Rule 3568
Rubi steps
\begin {align*} \int \frac {\cos ^2(c+d x)}{(a+i a \tan (c+d x))^{5/2}} \, dx &=-\frac {\left (i a^3\right ) \text {Subst}\left (\int \frac {1}{(a-x)^2 (a+x)^{9/2}} \, dx,x,i a \tan (c+d x)\right )}{d}\\ &=-\frac {i a^2}{2 d (a-i a \tan (c+d x)) (a+i a \tan (c+d x))^{7/2}}-\frac {\left (9 i a^2\right ) \text {Subst}\left (\int \frac {1}{(a-x) (a+x)^{9/2}} \, dx,x,i a \tan (c+d x)\right )}{4 d}\\ &=\frac {9 i a}{28 d (a+i a \tan (c+d x))^{7/2}}-\frac {i a^2}{2 d (a-i a \tan (c+d x)) (a+i a \tan (c+d x))^{7/2}}-\frac {(9 i a) \text {Subst}\left (\int \frac {1}{(a-x) (a+x)^{7/2}} \, dx,x,i a \tan (c+d x)\right )}{8 d}\\ &=\frac {9 i a}{28 d (a+i a \tan (c+d x))^{7/2}}-\frac {i a^2}{2 d (a-i a \tan (c+d x)) (a+i a \tan (c+d x))^{7/2}}+\frac {9 i}{40 d (a+i a \tan (c+d x))^{5/2}}-\frac {(9 i) \text {Subst}\left (\int \frac {1}{(a-x) (a+x)^{5/2}} \, dx,x,i a \tan (c+d x)\right )}{16 d}\\ &=\frac {9 i a}{28 d (a+i a \tan (c+d x))^{7/2}}-\frac {i a^2}{2 d (a-i a \tan (c+d x)) (a+i a \tan (c+d x))^{7/2}}+\frac {9 i}{40 d (a+i a \tan (c+d x))^{5/2}}+\frac {3 i}{16 a d (a+i a \tan (c+d x))^{3/2}}-\frac {(9 i) \text {Subst}\left (\int \frac {1}{(a-x) (a+x)^{3/2}} \, dx,x,i a \tan (c+d x)\right )}{32 a d}\\ &=\frac {9 i a}{28 d (a+i a \tan (c+d x))^{7/2}}-\frac {i a^2}{2 d (a-i a \tan (c+d x)) (a+i a \tan (c+d x))^{7/2}}+\frac {9 i}{40 d (a+i a \tan (c+d x))^{5/2}}+\frac {3 i}{16 a d (a+i a \tan (c+d x))^{3/2}}+\frac {9 i}{32 a^2 d \sqrt {a+i a \tan (c+d x)}}-\frac {(9 i) \text {Subst}\left (\int \frac {1}{(a-x) \sqrt {a+x}} \, dx,x,i a \tan (c+d x)\right )}{64 a^2 d}\\ &=\frac {9 i a}{28 d (a+i a \tan (c+d x))^{7/2}}-\frac {i a^2}{2 d (a-i a \tan (c+d x)) (a+i a \tan (c+d x))^{7/2}}+\frac {9 i}{40 d (a+i a \tan (c+d x))^{5/2}}+\frac {3 i}{16 a d (a+i a \tan (c+d x))^{3/2}}+\frac {9 i}{32 a^2 d \sqrt {a+i a \tan (c+d x)}}-\frac {(9 i) \text {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,\sqrt {a+i a \tan (c+d x)}\right )}{32 a^2 d}\\ &=-\frac {9 i \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{32 \sqrt {2} a^{5/2} d}+\frac {9 i a}{28 d (a+i a \tan (c+d x))^{7/2}}-\frac {i a^2}{2 d (a-i a \tan (c+d x)) (a+i a \tan (c+d x))^{7/2}}+\frac {9 i}{40 d (a+i a \tan (c+d x))^{5/2}}+\frac {3 i}{16 a d (a+i a \tan (c+d x))^{3/2}}+\frac {9 i}{32 a^2 d \sqrt {a+i a \tan (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.37, size = 163, normalized size = 0.80 \begin {gather*} -\frac {i e^{-8 i (c+d x)} \left (1+e^{2 i (c+d x)}\right )^{3/2} \left (\sqrt {1+e^{2 i (c+d x)}} \left (-10-58 e^{2 i (c+d x)}-156 e^{4 i (c+d x)}-388 e^{6 i (c+d x)}+35 e^{8 i (c+d x)}\right )+315 e^{7 i (c+d x)} \sinh ^{-1}\left (e^{i (c+d x)}\right )\right ) \sec ^2(c+d x)}{4480 a^2 d \sqrt {a+i a \tan (c+d x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 388 vs. \(2 (160 ) = 320\).
time = 0.86, size = 389, normalized size = 1.91
method | result | size |
default | \(\frac {\sqrt {\frac {a \left (i \sin \left (d x +c \right )+\cos \left (d x +c \right )\right )}{\cos \left (d x +c \right )}}\, \left (2560 i \left (\cos ^{8}\left (d x +c \right )\right )+2560 \sin \left (d x +c \right ) \left (\cos ^{7}\left (d x +c \right )\right )-768 i \left (\cos ^{6}\left (d x +c \right )\right )+512 \sin \left (d x +c \right ) \left (\cos ^{5}\left (d x +c \right )\right )+96 i \left (\cos ^{4}\left (d x +c \right )\right )-315 i \cos \left (d x +c \right ) \arctan \left (\frac {\left (-i \cos \left (d x +c \right )+\sin \left (d x +c \right )+i\right ) \sqrt {2}}{2 \sin \left (d x +c \right ) \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}}\right ) \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sqrt {2}-315 i \arctan \left (\frac {\left (-i \cos \left (d x +c \right )+\sin \left (d x +c \right )+i\right ) \sqrt {2}}{2 \sin \left (d x +c \right ) \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}}\right ) \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sqrt {2}+672 \sin \left (d x +c \right ) \left (\cos ^{3}\left (d x +c \right )\right )-315 \sin \left (d x +c \right ) \arctan \left (\frac {\left (-i \cos \left (d x +c \right )+\sin \left (d x +c \right )+i\right ) \sqrt {2}}{2 \sin \left (d x +c \right ) \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}}\right ) \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sqrt {2}+420 i \left (\cos ^{2}\left (d x +c \right )\right )+1260 \sin \left (d x +c \right ) \cos \left (d x +c \right )\right )}{4480 d \,a^{3}}\) | \(389\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.50, size = 175, normalized size = 0.86 \begin {gather*} \frac {i \, {\left (\frac {4 \, {\left (315 \, {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{4} - 420 \, {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{3} a - 168 \, {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{2} a^{2} - 144 \, {\left (i \, a \tan \left (d x + c\right ) + a\right )} a^{3} - 160 \, a^{4}\right )}}{{\left (i \, a \tan \left (d x + c\right ) + a\right )}^{\frac {9}{2}} a - 2 \, {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{\frac {7}{2}} a^{2}} + \frac {315 \, \sqrt {2} \log \left (-\frac {\sqrt {2} \sqrt {a} - \sqrt {i \, a \tan \left (d x + c\right ) + a}}{\sqrt {2} \sqrt {a} + \sqrt {i \, a \tan \left (d x + c\right ) + a}}\right )}{a^{\frac {3}{2}}}\right )}}{4480 \, a d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 305 vs. \(2 (147) = 294\).
time = 0.38, size = 305, normalized size = 1.50 \begin {gather*} \frac {{\left (-315 i \, \sqrt {\frac {1}{2}} a^{3} d \sqrt {\frac {1}{a^{5} d^{2}}} e^{\left (7 i \, d x + 7 i \, c\right )} \log \left (4 \, {\left (\sqrt {2} \sqrt {\frac {1}{2}} {\left (a^{3} d e^{\left (2 i \, d x + 2 i \, c\right )} + a^{3} d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {1}{a^{5} d^{2}}} + a e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-i \, d x - i \, c\right )}\right ) + 315 i \, \sqrt {\frac {1}{2}} a^{3} d \sqrt {\frac {1}{a^{5} d^{2}}} e^{\left (7 i \, d x + 7 i \, c\right )} \log \left (-4 \, {\left (\sqrt {2} \sqrt {\frac {1}{2}} {\left (a^{3} d e^{\left (2 i \, d x + 2 i \, c\right )} + a^{3} d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {1}{a^{5} d^{2}}} - a e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-i \, d x - i \, c\right )}\right ) + \sqrt {2} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} {\left (-35 i \, e^{\left (10 i \, d x + 10 i \, c\right )} + 353 i \, e^{\left (8 i \, d x + 8 i \, c\right )} + 544 i \, e^{\left (6 i \, d x + 6 i \, c\right )} + 214 i \, e^{\left (4 i \, d x + 4 i \, c\right )} + 68 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + 10 i\right )}\right )} e^{\left (-7 i \, d x - 7 i \, c\right )}}{2240 \, a^{3} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\cos ^{2}{\left (c + d x \right )}}{\left (i a \left (\tan {\left (c + d x \right )} - i\right )\right )^{\frac {5}{2}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\cos \left (c+d\,x\right )}^2}{{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^{5/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________